#include "BDPainterWidget.h"


BDPainterWidget::BDPainterWidget(QWidget *parent)
	: QWidget(parent)
	, m_GazePoint(225, 225)
	, m_iRadius(50)
{
	painter = new QPainter(this);
}


BDPainterWidget::~BDPainterWidget()
{
}

void BDPainterWidget::paintEvent(QPaintEvent* event)
{
	painter->begin(this);
	for (int i = 0; i < m_vecShapes.size(); ++i) {
		m_vecShapes[i]->Draw(painter);
		delete m_vecShapes[i];
		m_vecShapes[i] = NULL;
	}
	m_vecShapes.clear();
	painter->end();
}